﻿using System;
using Infrastructure;
using SnowTech.SmartTms.App.Response;
using SnowTech.SmartTms.Repository.Domain;

namespace SnowTech.SmartTms.App.Line.Response
{
    public class LineView
    {
        /// <summary>
        /// ID
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 线路名称
        /// </summary>
        public string LineName { get; set; }
        /// <summary>
        /// 起点
        /// </summary>
        public string Origin { get; set; }
        /// <summary>
        /// 终点
        /// </summary>
        public string Destination { get; set; }
        /// <summary>
        /// 是否外协
        /// </summary>
        public int IsOutsource { get; set; } 
        /// <summary>
        /// 货主姓名
        /// </summary>
        public string Shipper { get; set; }
        /// <summary>
        /// 货主手机号
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 货主单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string UpdateName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public System.DateTime UpdateTime { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateName { get; set; }
        /// <summary
        /// 创建时间
        /// </summary>
        public System.DateTime CreateTime { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int State { get; set; }
        /// <summary>
        /// 起点详细地址
        /// </summary>
        public string OriginAddress { get; set; }
        /// <summary>
        /// 终点详细地址
        /// </summary>
        public string DestinationAddress { get; set; }
         

        public static implicit operator LineView(TmsLine line) 
        {
            return line.MapTo<LineView>();
        }

        public static implicit operator TmsLine(LineView rolevm)
        {
            return rolevm.MapTo<TmsLine>(); 
        }
    }
}
